package com.llynosy.interview.service;

import com.llynosy.interview.base.AbstractCommCRUD;
import com.llynosy.interview.mapper.AnswerMapper;
import com.llynosy.interview.po.Answer;
import com.llynosy.interview.po.Problem;
import com.llynosy.interview.po.Result;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class AnswerService  extends AbstractCommCRUD<Answer>{

    public Answer getRecommendAnswer(Long problemId){
        Answer answer=((AnswerMapper)this.dao).queryAnswerByProblemId(problemId);
        return answer;
    }

    public List<Answer> getAnswersByProblemId(Long problemId){
        List<Answer> answers=((AnswerMapper)(this.dao)).querAnswersByProblemId(problemId);
        return answers;
    }
}
